package com.wxt.ssm.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wxt.ssm.bean.Department;
import com.wxt.ssm.bean.Msg;
import com.wxt.ssm.service.DeptService;

import org.springframework.web.bind.annotation.ResponseBody;
@Controller
public class DeptController {
	@Autowired
	DeptService deptService;
	
	@RequestMapping("/depts")
	@ResponseBody
	Msg getdeps(){
	List  <Department> list=	deptService.getDeptAll();
		return Msg.succes().add("dept", list);
		
	}

}
